added ability to output attribute table