add isEof method + tests