Updated Metrics code