added AIMAG statements to strip imaginary part out of the complex numbers