changed release, now handles read mode and write mode