fixing various bugs to get search working including:
-- reversing arguments to granger test
-- staying within time range

also added random bag size