updated demo handling