fixed the issues

added a debug variable, read values from the joystick once, will change
the rest of the program