added ReadFile function