more updates to metric functions