Is the problem when the function is being called? It should work as you've written it, but the function will only be called once unless the function takes a bindable argument, in which case it'd be called whenever the binding on the argument is triggered.