some progress with logic around constraints