removed mutable form cached_function