bug fixes, added examples