adds code for handling activities in the main menu