add example of custom update-fn