updated flow.rb with user input