Division works! (Thought of a much better algorithm though, 
will implement it tomorrow)