adding code for debugging nesting issue