changed reading file from testing to production code