added support for intervals