Modified to enable switching slides