Removed the ui object from the example, to make it clearer.