update to use masked array in prim