quick magick refactoring