extended to support the use of dom_container