added basic upvoting algorithm