added anonymous funtion and added comment