adding listener as dependency for carousel