Sliding window string calculation example works