Added code to Magnet Bad class