added decrementing the nesting depth