Add Spencer's solution