Updated Spinner code