Changed sequences from being hard-coded to being read from user keyboard.