a lot of work done on command input handling