moved length to data_length