Old KSI Algorithm