Implemented leaderboard function