changing digits in order