random function for document creation (5-10, 4-8, 3-6, 2-4, 1-2)