handle eof differently