Borrowed an input function.