fixed the carousel implementation