added imag and real functions