added caching and repeated loading