updated to work with node 0.6