use a variable to determine width of carousel image