consume function now get results from n days back