generate topology