implement node-style callbacks