working and consistent with Tao's first version