add r/w status, add typedef instead of struct