Re-write Promise.then since it must return a new promise instead of itself