implemented metrics()