Creation of a parallel function to create skeleton graph