metrics script enhancements