implementing metrics