Added openUntil function.