added getDirection