added getlastDirection() to memory