changed string to bytes in serialization