     
     func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
         self.tableView.deselectRowAtIndexPath(indexPath, animated: true)
-        selectedName = userArray[userArray.count-indexPath.row-1]
-        selectedScore = String(score[userArray.count - indexPath.row-1])
+        selectedName = userArray[indexPath.row]
+        selectedScore = String(score[indexPath.row])
         //let destinationVC = profileVC()
         //destinationVC.name = selectedName
         performSegueWithIdentifier("profileView", sender: self)

        var queryUser = PFUser.query() as PFQuery?
        queryUser!.findObjectsInBackgroundWithBlock {
            (users: [AnyObject]?, error: NSError?) -> Void in
            
            //self.tableView.reloadData()
            queryUser!.whereKey("username", equalTo: self.userArray[self.userArray.count-indexPath.row-1])
            if error == nil {
                // The find succeeded.
                println("Successfully retrieved \(users!.count) users.")

            userArray.removeAll(keepCapacity: false)
            score.removeAll(keepCapacity: false)
            createdAt.removeAll(keepCapacity: false)
            query.orderByDescending("createdAt")
            query.whereKey("text", notEqualTo: "")
            query.findObjectsInBackgroundWithBlock({ (objects, error) -> Void in
                //self.createdAt.append("gwef")
