Made sure that numbers bigger than 16 digits will only be considered for the lower 16 digits.
This method could use refinement (i.e.: there are some 16-digit numbers that still won't work) but it's a good start. #8