implemented constraints on search
merge