Add implementation for then interface in the promise