added command parser and tests for it