I'm very weak in STL, I got the code snippet from the internet, so I don't know exactly what it does?
Also, the two AND statements prior to the Transfer instruction have no effect on the Transfer so they serve no purpose. What was the intent for those instructions?