Modified the notify method for passing anything as data.