If you check which tests are failing, it is the bottom two tests, which test the logic of your second if statement. Your problem is that your first statement is always run before the second. You need to run your second if statement before the first. Your first if statement checks if the string length is longer than the number, which is most often true. Because of this, your second if statement which handles the scenario of the number being less than 3 is barely run. Your code in the second if statement is correct, but it is not being run, so you need to figure out a way to somehow check the number length and run that scenario before checking if the string length is greater than the number.