improvements to the nesting