input unclear bug fixed, clear code