separate functions that do not belong to the class

moved the function to add events to business functions