set up mixin to change attributes and trigger events on change