added menu click detector