added comments on end tags for clarity