use future to replace wait