attempted flow algorithm
fixed bug
some more changes
fixed merge confilct
Fixing current flow algorithm