bug fix, caching of results