Grafting and branching of polymers