added treeConvert factory to convert array into object and insert into tree. .then (promise) needs to be fixed