added input functions for keyboard movement