beginning of joystick control