Implemented caching in function. Changed name to be more describing. REOL-69