refactor optional menu