added extended version of source_tree method and test for it