handling click on grouped items