using dot products in pcg