usng eof logic on limit