change read function