command parser and extractor