Finished chap6 code magnets