only works with node >= 0.8