reduced amount of code in exec.rb