Menu works correctly
added function for infinite input