added sorting to tables

sorts all the tables by up vote