print_table now stops when it reaches table.size