code that I pushed before did not work on load. I am now checking the event type