recursion and typo in rmagic with zid