demo updated with new lib api