old version - not working
miss read()