parse sub commands