add read write struct