start of working with events