Added code on my events page and API