Added code to get the chosen item