Fixed prim, still need to clean up output