added a DRY method for the project controller, rescue for id not found