implement promises in Network and Node