added button functions to carousel