balancing quality cost