vectorize menu and sort by posterior