modify the metric fetch function