fixed defects; demo added