building heirarchy