detelted useless algorithm