cox model with time dependent covariate

I am trying to fit a cox model:
h(t, beta) = h0(t)exp(X*beta), while X = (x1, x2, ..., xN)

but, for instance, x1 is binary with value of 0 or 1, but the hazard ratio of 1 and 0 is not proportional:
t: 1 2 3 4 5 6 7 ....
hazard ratio: 0.2 0.3 0.5 0.1 0.1 0.1 0.1 ....

it has a big difference when t<4 and t>=4, so how can I put this into my model, I use the survival package and coxph function in R.

when I try to build a new variable: t.var = I(t<4)*x1 and add it into coxph function, but it seems that it is not allowed to do so. I wonder if anybody has meet this problem before or have any idea that I could have a try.