added magic.py