How to create a network object