updated to work with node