constant and keyboard input added