script exports table with density