change n to spinner