implemented received message parsing