added algo toggle