tested menu function