Finished code in improved_ask.rb