added generator support with node style callbacks