Added time ranges in api