Explain code 

I add more Comments for your code to help developer that have't experience in security