added arrays and keyboard input