make topology function and minor modification to StormIt core.