Added my implementation of generic serializer