finally, extracted pml from loop and it works for both muinv and eps