Add contains method and tests