improved error handling
copyright notice update
add licence
v1.0.2