corrected expand node function in sheet 4