refactor projects controller to use scope