refactored and fixed projects delete