updated datapath generation