creating file reader and formatter