add some networking code to spawner