On the van Kampen theorem