fixed handling of input function, and added user input syntax