better implementation of the protcoll

Signed-off-by: julian <julian.lorra@hotmail.de>