working on complex numbers