Implemented containsStrict method.