first submission after separating the behind-the-scene fxns from the event handlers