new functions in joystick.c