functional pipeline for data