Implemented bar changing carousel algorithm