changed conditions for deletion