Breaking the magician's code