Added functions. Renamed wrong named functions e.g. *_event to *_f