prove the recursive pattern is better