adding menu logic