fixed eof logic and used vector for stock list