bootstrap tree view function: Work in progress not fully working