added nested for loop to print table e