added limit and sortMetric

allowing sorting