added print_structure_data subroutine
tidying up output