feat: custom serialize and unserialize functions