use switch to determine cmd receive from client