add the 'doubling test' from the book to threesum