Manipulating the magnetic force