ADDED basic upvoting algorithm.