moved the creation of the 'confirm move' link click handler out of the loop and into a function