moved subroutines to data_dump