add some useful function to spinner