make sure that all reusable function returns a promise.