script for metrics