added memoization hack to speed things up

this is not the way to do this, but makes the app usable for
the time being