added methods to network.java