added Serializer interface and an example