reworked client message parsing