refracted else if to create last2Digit function