added a type serializeFn dictionary

Allows for more customization