class to save networks