Altered printTable function