added test for intervals