Changed Algorithm, For Real this time