generalized the level splitting/joining to enable any number of levels in the database.