Using Promise monad explicitly.