metric and summary function