simplified SYNOPSIS
fixed an example
added a test for error event