script to format table print