add file read function