new handler for both join and leave