Rename and better algo