This belongs in the lower portion of the file, with the rest of the event handler code