added code to see when keys are pressed