loop issue fixed, now works with all ranges of characters up to a max of 9