If / For / While nesting