add byte array serializer; refactor test case