reuse the contains idiom to improve readability