this process iterates until there are no more constraints