fixing direcitons functionality