improved metrics generation