finish variable changing of v, d, and p