updated callbacks to be in node.js style with a first argument of err