         var queryUser = PFUser.query() as PFQuery?
         queryUser!.findObjectsInBackgroundWithBlock {
             (users: [AnyObject]?, error: NSError?) -> Void in
-            
+            queryUser!.orderByDescending("createdAt")
             //self.tableView.reloadData()
-            queryUser!.whereKey("username", equalTo: self.userArray[self.userArray.count-indexPath.row-1])
+            queryUser!.whereKey("username", equalTo: self.userArray[indexPath.row])
             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.whereKey("text", notEqualTo: "")
            query.findObjectsInBackgroundWithBlock({ (objects, error) -> Void in
                //self.createdAt.append("gwef")

        //self.tableView.insertRowsAtIndexPaths(0, withRowAnimation: UITableViewRowAnimation.Bottom)
        cell.typeImageView.image = UIImage(named: "timeline-chat")
        //cell.profileImageView.image = UIImage(named: "profile-pic-1")
        cell.nameLabel.text = userArray[indexPath.row] // to flip
        println("HFBHDNJDEWDN")
        println(indexPath.row)
        
        cell.nameLabel.textColor = UIColor.greenColor()
        //cell.nameLabel.textColor = UIColor.whiteColor()
        cell.postLabel?.text = messages[indexPath.row]
        cell.postLabel?.textColor = UIColor.whiteColor()
        cell.dateLabel.text = String(createdAt[indexPath.row]) + " min ago"
        cell.dateLabel.textColor = UIColor.whiteColor()
        cell.scoreLabel.textColor = UIColor.greenColor()
        cell.scoreLabel.text = "Likes - " + String(score[indexPath.row])
        
        return cell
        
