added comment and removed dead code