add the functionality of joining event