Fixed Case counting and added comment