demo updated, fixed apis in the documentation