switched over to using nan for easier upgrades