refactor initialize.rb