add function readfile and modify comment