mixins for within function

Im not sure if this is what we are going for, just putting in the PR for discussion.