rewrite buildsong in node