build categories tree(not finished)