Added thread function to chain changes.