add parent scope to recurcive elements