implemented dynamic main menu