fixed to file output, need to add more parameter for analysis