improve menu generation