bug fixes and examples added