made worker.rb more succinct