Added callback option for event functions