added waste_doc parameter to document_to_poly() function
resolves #4. resolves #5.