read and write are close to working.