chapter6: pool puzzle