before merging mahdi's changes
fixed the events

returning events