improved mixin