started alternative prim implementation