binary tree using future and promise