Change contains and assert to in and @assert

to get rid of the error messages