added first implementation of network code