added prim.c