Code for magdata for Bob