data structures and serialization