made openAndClose public