refactor menu build