Use event listener instead of
Add magnetize function