updated code for carousels and tabs