multiple digits refactor