Added joystick code