add valid number solution, too many cases, referd solutions online