added read/write button actions.