Adapted for running with node