Yong's algorithm