make grep input more flexible and changes to date range