explained a bit on magic.c