easiest way to return a promise from a function