Modify codes.
Set direction
Set direction