more types in read write struct
put ttype inside