prim instruction and tests implemented