added macros for write and read to rl78