Add new algo
Fix for last symbol bug