updated syntax of callbacks to match node