added functional spinner, extracted out to module.