nesting issues fixed