readwrite fix

cleanup, fixed readwrite procedure