more effective file reading