Solving the gang problem