returning EOF when input is empty