Implemented direction changing