implemented contains method