improved documentation, updated example.