logic.rb