added build swipe carousel function