updated mixin and fully tested