modified demo initialization