quick commit

revised magnet spacing algorithm