add some metrics function