read file func added