simplified
 
Magnets