checking the direction

checking the direction