added offsetDirection