fixed my fancy algorithm
 Please enter the commit message for your changes. Lines starting