modified Ship.rb