rebuild namespace structure