complete ai6.rb