Began implementing prufer algorithm