how to create and use a spinner