updating event handler and removing csv to json to eliminate an extra step