changing event handler, changing form closing conditions