Implemented method 1
Fixed bug with duplicating != constraints