re-added conditionl caching
removed comments