Fix import
Fix algorithm