change from event based keyboard input to poll based