Added slidecount variable