split config function to Config pm