add menu and function to action listener