update solution for Valid Number