added a separate windows message handler and the start of keyboard input