refactor receipt and create run.rb'