Rewrite sh_specdm.lua