modify to run under node webkit