changes to fix serialization