moved message parsing to client side