Just one algorithm