Added parameters for querying past timeframe