adding caching
logging