parse commands