adjusted for node 0.10.1