added a bit of dynamic date ranges - still a bit of tidying up to do
dynamic date range
merged