This is not complete code, it is missing code for the callbacks. Also, you are using change callback that is triggered when value has changed, and I am not sure how do you use that if you need to use ‘add’, since change in your case will never run before add is called.
You have two examples on how to use the add/stop/start functions in the demo page Methods.