initialized spinner and added listener