Have a algorithm that actually works