Added a menu building function