Added top ten sorting logic