creating flow inside application