start of command process logic