create sections out of DOM elements