enhanced cpp demo program