made some last minute changes to onClick event