added closing with insert