move simple event scheme to main code temporarily