finished the core machinery for SICP algorithm