code for magoosh application