big changes to example 1 in documentation