menu rendering refactored