magnet wrapped in a class