adding in element detection for the carousel so that it only kicks off if the