overhauled network implementation; API remains the same