modified to print the correct content