John remembered Bill because he had had been thinking about wicker chairs.

Who is he referring to in this sentence?
John