fixed prims bug, added examples