add methods to output result into file