replaced class surgery with mixin, which plays much nicer with pickling