added exceptions
more error handling
error tweak
example update
added optional object ownership
exception update