refactored things, made getting a key press static