moved button input checking to InputListener