Ninja Ray and DaddyDerek's awesome algorithim