Added function to condense duplicate values in the GP to improve runtime.