refactored project controller