change read/write method