add some necessary `then` and `return`