I would factor out this function into DataAlgos, with the minimum signature required.