Upgrading function print_d().