add metphi
better parallelization