added cmd parsing