Change to using callbacks.