added some network code