update slide function