code explanation
 
Magnete