small changes and added comment