add clause for closing tags