added edmonds-karp (and a few small fixes)