adding closing tags properly