updated output file, needs imaginary numbers support