multiple time ranges and better logging