refactored deleteProject and added exceptions