refactored code, can now set accepted answer and nearly can properly do
upvotes