lastest code that shows my new algorithm not working