replaced WRITE_READ() calls with fetch16() and fetch40()