completed upto ex17.rb