Functions v 0.33

Added more cases to sortByUpvotes function