algo seems working!