changing how $emit callback is executed