pass document to location calculation