change complex and compute magnitude