convert ReadFile to class