added behavior for selected slides