updating codes for cooperate with menu lib lib menu