-Implemented spinner functionality