refactor mixin