add prim solution