changed to dynamic metric handling