Introduced simple caching for better speed