                             //completion?()
                     })
             })
+            println("rqwqwrw")
             self.upVote(self)
         }
         

        //let buttonRow = sender.tag
        if let buttonRow = sender.tag {
            var votedBy = voteObject[buttonRow]["votedBy"] as! [String]
            if !contains(votedBy, currentUser!) {
                var scoreParse = voteObject[buttonRow]["score"]! as? Int
                scoreParse = scoreParse! + 1
                voteObject[buttonRow].setObject(NSNumber(integer: scoreParse!), forKey: "score")
                println("fqwgref")
                println(currentUser)
                votedBy.append(currentUser!)
                voteObject[buttonRow]["votedBy"] = votedBy
                voteObject[buttonRow].saveInBackgroundWithBlock {
                    (success: Bool, error: NSError?) -> Void in

                        SCLAlertView().showWarning("Error Voting", subTitle: "Check Your Internet Connection.")
                    }
                }
            } else { // already voted -- add to retrieve also
                var upVoted : Bool = (voteObject[buttonRow]["upVote"]! as? Bool)!
                if upVoted {
                    // then downvote by -2
                    var scoreParse = voteObject[buttonRow]["score"]! as? Int
                    scoreParse = scoreParse! - 2
                    voteObject[buttonRow].setObject(NSNumber(integer: scoreParse!), forKey: "score")
                    //votedBy.append(currentUserId!)
                    voteObject[buttonRow]["upVote"] = false
                    //voteObject[buttonRow]["votedBy"] = votedBy
                    voteObject[buttonRow].saveInBackgroundWithBlock {
                        (success: Bool, error: NSError?) -> Void in
                        if (success) {
                            self.retrieve()
                        } else {
                            println("Couldn't Vote!")
                            SCLAlertView().showWarning("Error Voting", subTitle: "Check Your Internet Connection.")
                        }
                    }
                }
                println("Already Voted")
            }
        }
