added starts_with_or_contains implementation