New example using the functional api.