adjust to serializer not static anymore

also add interface/trait for sake of simplicity