Iimplement the requirement for aggregation of metric