two ways to define a network