updated dynamic menu generation