correctly parse single-character commands; add a test