add timeout to each document