simplified code for command input