added HTML as root element, updated to check for *should* be close tags
added return value too