0=read only
1=write