mixin non-d1 friendly

D1 doesn't support version(unittest) had to make functions mixin.