updated closing and opening toggle