getting all intervals