See, you found a solution your own. Unfortunately it is not a good one since you change the content of two item and do not swap them. But since you are able to create local variables (row and currentIndex) you can now use the suggested functions and then you really have it.