refactor potemkin methods into dsl.rb