minor prim modification