Added a bit more functionality to example