working on SICP 2.2.3 section