menu code simplified