changed code to print all columns