re-write to fit data path