made pmlval function return complex