spanning tree colorato + refactor