setParams added to allow caching