working on sicp 2.6