added basic upvoting algorithm'