fixed errors in create message, added code to client driver to use switch to handle messages