angular init
working upvotes and sorting algo