update polling to include a callback