rest of serialization functions