Removed recursion in dcm()