added sorting comparator
ranking not working at the moment...