future monad implementation