refactored future waiting