cast digits to integers