small edits, edited demo code