final demonstration code