rewrite menu as class