adding component tree operations in Main #5