updating to support new nan