updated constraint checking