added use of inputmanager instead