removed lru_cache from the code.