continue implementation of base serializer
first working version, added some tests