implemented flow calculation GUI