fixed logic to match design-driven mean