made functioning menu as a function