need to do correct closing and reopening.