break out carousel stuff into functions