add tests and refactor the command builder