added comment to function