working getinput.c