callback and error callback need to be last so that we can easily turn the method into a promise.