replaced all .real and .imag() with creal and cimag