added minimum quantity threshold setting