improved documentation. added an example.