takes into account the quality and availability