added compression and caching