changed index and slide image