added parse_cmd function to client. Seems to be working fine.