working on serialize