fix for input function