magic.py moved intf add to a function from main()