fixed the input fuction error