removed unnecessary method and fixed bug with direction checking