added the left right direction change