made get_end_digits public