added printTable funcion for testing/debugging