added comment and code to personal functions