Changed input to happen on-the-fly for keyboard input using raw_input