added comment to big if block