creating master code and using datasotree