working version with upvotes enabled