added read command code.  every time read command comes in, the user callback function now updates the variable before sending the response to the client.