remove deprecated API calls / change predecessor array to map
ford fulkerson algorithm