refactor project.rb