complelted test4.rb first version