Added while loop for states option