Refactor contain Method