setting up the cost index restrictions to work as an and