move some methods to a mixin