Addedcode that will allow multiple sections to be programmatically closed