change event key location to event.loc