Updated Demo code