added 'expect eof'