changes mainly for level.rb