added random network type generation