added spanningTree + generate_dot, made small syntactical changes and matched indentation levels with rest of file