completed demonstration code format