added examples, and fixed bugs
added examples, and fixed bugs