join/leave analyzer code polish