Edit upvote function