file reading implemented, still crashing