tons of changes.   wtf is wrong w/ me
simplified code for caching convention using function composition