handle survival condition