linking data from the opt.data with tree-data in method 'getData'