Splt get_data func into three, one still in progress