Change a method's return object to a promise