Flow and function structure chages

Function input = dataset (no txt file)