refactored menu code to lower as much as possible qty of code paths