move the change event out of the loop