improve looper.rb