add more implementation for binary protocol