Added doesContain function