Upgrading the function print_d().