finished refactoring idea.rb