better error handling, remove date_range from test