input from keyboard or file