updated bug in interval creation