Finish implementing zhen's method