```\nuint256 \_tmpIndex = \_currentIndex - 1;\nuint256 \_currentUserAmount = usersTeamInfo[msg.sender].stakedAmount;\n \nwhile (\_currentUserAmount > usersTeamInfo[topUsers[\_tmpIndex]].stakedAmount) {\n    address \_tmpAddr = topUsers[\_tmpIndex];\n    topUsers[\_tmpIndex] = msg.sender;\n    topUsers[\_tmpIndex + 1] = \_tmpAddr;\n \n    if (\_tmpIndex == 0) {\n        break;\n    }\n \n    \_tmpIndex--;\n}\n```\n