add the endif tag