added js for joystick