implement __contains__