automation code for CD demo math library