updated for compat. with node 0.10