first impl of self-adjusting memo