added comment line
fixed invalid input bug