changed main3 added component graph construction algorithm. Needs improvement and simplification
merged conflicts of lab and room