solved error-checking issue in menu function