added handlers for magic server