future.then implementation