added isPressed method to Input class