modified model/atbat.rb