updated demo with initialization code