wrote out the RW and write byte functions. Still need to be tested