Simplified the code selecting an option