added save method for networks