modifying create-event function and adding create-location