refactor menu