node.connect accepts a callback. adapted