refactor command handling to use method lookup vs switch, easier to support arbitrary commands #3