added sorting by vote functionality