updated binary message handling