implemented basic eventing system