Can you add some comment to explain what does this code do ?