implemented hierarchy tree model in model package