implemented serialization in source generator - test needed