handle item selected event