trying to implement remove thread on iOS