fixed the input function localization