create close project fuction