added delete and time range query