Added Spinner and Button logic