Added caching. related to #8