repeat function and monad, adding document data appending