add range and fix menu updating