achieve direction w

please check while loop for init space later