updated for new flow to incorporate